/*
 * @Author: 姚潘涛
 * @Date: 2024-04-08 15:18:03
 * @LastEditors: 姚潘涛
 * @LastEditTime: 2024-10-10 16:32:03
 * @Description:
 *
 * Copyright (c) 2024 by pandaman, All Rights Reserved.
 */
#include "xict_driver/utils/ecal_publisher_manager.h"
#include "xict_common/log/log.h"
#include "xict_driver/param/drivers_params.h"

namespace xict_driver {
    namespace utils {
        EcalPublisherManager::EcalPublisherManager() = default;

        void EcalPublisherManager::Initialize(
            const std::shared_ptr<xict_driver::param::DriversParams>&
                _driver_params) {
            // 初始化eCAL发布器
            for (auto& camera_driver_config :
                 _driver_params->camera_driver_configs_) {
                image_publisher_[camera_driver_config.topic] =
                    eCAL::protobuf::CPublisher<xcmg_proto::OpencvImage>(
                        camera_driver_config.topic);
            }
        }
    }   // namespace utils
}   // namespace xict_driver